<%@ Application Language="C#" %>

<script runat="server">

    void Application_Start(object sender, EventArgs e) 
    {
        // Code that runs on application startup
        Application["numberOfClient"] = 0;
    }
    
    void Application_End(object sender, EventArgs e) 
    {
        //  Code that runs on application shutdown

    }
        
    void Application_Error(object sender, EventArgs e) 
    { 
        // Code that runs when an unhandled error occurs

    }

    void Session_Start(object sender, EventArgs e) 
    {
        Application.Lock();
        Application["numberOfClient"] = (int)Application["numberOfClient"] + 1;
        Application.UnLock();
        Session.Timeout = 1400;
        Session["LOGIN_OK"] = false;
        Session["Username"] = "";
        Session["DefaultPage"] = "";        
        Session["Nam"]= DateTime.Now.Year;
    }

    void Session_End(object sender, EventArgs e) 
    {
        Session.Contents.RemoveAll();
        Session.Abandon();

    }
       
</script>
